//
//  LoginDataCenter.swift
//  Eternity
//
//  Created by cll12_12 on 2016/12/30.
//  Copyright © 2016年 ZhengWei. All rights reserved.
//

let defaultUserInfo = LoginDataCenter.defaultUserInfo as LoginDataCenter

import Foundation

class LoginDataCenter: NSObject {
    
    class var defaultUserInfo: LoginDataCenter {
        struct Static {
            static let instence: LoginDataCenter = LoginDataCenter()
        }
        return Static.instence
    }
    
    func isLogin() -> Bool {
        let userDefault = UserDefaults.standard
        let isLogin = userDefault.object(forKey: "loginStatus")
        if isLogin != nil {
             return isLogin! as! Bool
        }
        return false
    }
}
